<!DOCTYPE html>
<html>
<head>
    <title></title>
    <#include "/header.html">
</head>
<body>
<div id="rrapp" v-cloak>
    <div v-show="showList">

    <div style="height: 50px;margin-bottom: 20px;">
        <div style="float: left;margin-bottom: 10px">
            <select id="typeSearch" class="form-control" style="width: 200px;">
                <option value="" disabled selected>分类名称</option>
                <option value="spring">spring</option>
                <option value="jvm">jvm</option>
                <option value="java基础">java基础</option>
                <option value="架构设计">架构设计</option>
                <option value="多线程">多线程</option>
                <option value="高并发">高并发</option>
                <option value="算法">算法</option>
                <option value="设计模式">设计模式</option>
                <option value="数据库">数据库</option>
            </select>
        </div>
        <div style="float: left;margin-bottom: 10px;margin-left: 10px">
            <select id="levelSearch1" class="form-control" style="width: 200px;">
                <option value="" disabled selected>评分范围起</option>
                <option value="1">1</option>
                <option value="2">2</option>
                <option value="3">3</option>
                <option value="4">4</option>
                <option value="5">5</option>
            </select>
        </div>
        <div style="float: left;margin-bottom: 10px;margin-left: 10px">
            <select id="levelSearch2" class="form-control" style="width: 200px;margin-bottom: 20px;">
                <option value="" disabled selected>评分范围止</option>
                <option value="1">1</option>
                <option value="2">2</option>
                <option value="3">3</option>
                <option value="4">4</option>
                <option value="5">5</option>
            </select>
        </div>
        <div style="float: left;margin-bottom: 10px;margin-left: 10px">
            <input id="keyword" type="text" class="form-control" placeholder="问题关键字" style="width: 200px;"/>
        </div>
        <a class="btn btn-primary" @click="search" style="float: left;margin-left: 10px;"><i class="fa fa-search-o"></i>&nbsp;查询</a>
        <div class="grid-btn" style="float: right">
            <#if shiro.hasPermission("facejava:javaquestion:save")>
            <a class="btn btn-primary" @click="add"><i class="fa fa-plus"></i>&nbsp;新增</a></#if>
                <#if shiro.hasPermission("facejava:javaquestion:update")>
                <a class="btn btn-primary" @click="update"><i class="fa fa-pencil-square-o"></i>&nbsp;修改</a>
            </#if>
                <#if shiro.hasPermission("facejava:javaquestion:delete")>
                <a class="btn btn-primary" @click="del"><i class="fa fa-trash-o"></i>&nbsp;删除</a>
            </#if>
    <#if shiro.hasPermission("facejava:javaquestion:level")>
    <a class="btn btn-primary" @click="level"><i class="fa fa-star-o"></i>&nbsp;评分</a>
</#if>
        </div>
    </div>

<table id="jqGrid"></table>
<div id="jqGridPager"></div>
</div>
<div id="layerBox" style="display: none;text-align: center;padding: 10px">
    <textarea class="form-control" v-model="answer" style="width: 90%;height: 650px"></textarea>
</div>
<div v-show="!showList" class="panel panel-default">
    <div class="panel-heading">{{title}}</div>
    <form class="form-horizontal">
        <div class="form-group">
            <div class="col-sm-2 control-label">问题</div>
            <div class="col-sm-10">
                <input type="text" class="form-control" v-model="javaQuestion.question" placeholder=""/>
            </div>
        </div>
        <div class="form-group">
            <div class="col-sm-2 control-label">答案</div>
            <div class="col-sm-10">
                <textarea class="form-control" v-model="javaQuestion.answer" rows="3"></textarea>
            </div>
        </div>
        <div class="form-group">
            <div class="col-sm-2 control-label">类型</div>
            <div class="col-sm-10">
                <select class="form-control" v-model="javaQuestion.type">
                    <option value=""></option>
                    <option value="spring">spring</option>
                    <option value="jvm">jvm</option>
                    <option value="java基础">java基础</option>
                    <option value="架构设计">架构设计</option>
                    <option value="多线程">多线程</option>
                    <option value="高并发">高并发</option>
                    <option value="算法">算法</option>
                    <option value="设计模式">设计模式</option>
                    <option value="数据库">数据库</option>
                </select>
            </div>
        </div>
        <div class="form-group">
            <div class="col-sm-2 control-label"></div>
            <input type="button" class="btn btn-primary" @click="saveOrUpdate" value="确定"/>
            &nbsp;&nbsp;<input type="button" class="btn btn-warning" @click="reload" value="返回"/>
        </div>
    </form>
</div>
</div>
<script src="${request.contextPath}/statics/js/modules/facejava/javaquestion.js?_${.now?long}"></script>
</body>
</html>